<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/9
 * Time: 10:36
 */
$key = $_COOKIE['userkey'];

$userName='';
session_start();
if(!isset($_SESSION[$key]["username"])){
    echo "你尚未登入，<a href='/login.php'>请登入</a>";
    die;
}else{
    $userName=$_SESSION[$key]["username"];
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>用户登录</title>
</head>
<body>
<form action="changePassword.php" method="post">
    <p>修改密码界面</p>
    <p>账号：<input type="text" name="username" id="" value="<?php echo $userName ?>" size="10" maxlength="10" readonly/></p>
    <p>旧密码：<input type="text" name="oldPsd" id="" value="" maxlength="16" size="10"/></p>
    <p>新密码：<input type="text" name="newPsd" id="" value="" maxlength="16" size="10"/></p>
    <input type="submit" name="b1" id="" value="修改密码" />
</form>

</body>
</html>

